home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / vector.lha / vector / colorvector.h < prev    next >
C/C++ Source or Header  |  1991-11-23  |  610b  |  26 lines

  1. #ifndef __COLORVECTOR_H
  2. #define __COLORVECTOR_H
  3.  
  4. #include "cvector.h"
  5.  
  6. // Classes to represent colors in RGB and HSV spaces, with supplied
  7. //  constructor/assignment conversion between the spaces.
  8.  
  9. class HSVcolor;
  10.  
  11. class RGBcolor : public Vector {
  12. public:
  13.     RGBcolor(float r, float g, float b) : Vector(r,g,b) { };
  14.     RGBcolor(HSVcolor &c) { *this = c; }
  15.     RGBcolor &operator=(HSVcolor &);
  16. };
  17.  
  18. class HSVcolor : public Vector {
  19. public:
  20.     HSVcolor(float h, float s, float v) : Vector(h,s,v) { };
  21.     HSVcolor(RGBcolor &c) { *this = c; }
  22.     HSVcolor &operator=(RGBcolor &);
  23. };
  24.  
  25. #endif /*__COLORVECTOR_H*/
  26.